package com.margo.project.append.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.margo.project.append.config.LcamConfig;
import com.margo.project.append.service.LcamDaoFactory;
import com.margo.project.append.service.LcamModelFactory;
import com.margo.project.append.service.LcamServiceFactory;

@Controller
public class LcamAction {
	@Autowired
	LcamModelFactory lcamModelFactory;
	
	@Autowired
	LcamDaoFactory lcamDaoFactory;
	
	@Autowired
	LcamServiceFactory lcamServiceFactory;
	
	@Autowired
	LcamConfig lcamConfig;
	
	public void createCode(String tableName) {
		lcamModelFactory.createVO(tableName, lcamConfig.getPackageName());
		lcamDaoFactory.createDAO(tableName, lcamConfig.getPackageName());
		lcamServiceFactory.createService(tableName, lcamConfig.getPackageName());
		lcamServiceFactory.createServiceImpl(tableName, lcamConfig.getPackageName());
	}
}
